import request from '@/utils/request'

// 获取聊天列表
export function getChatList() {
  return request({
    url: '/chat/list',
    method: 'get'
  })
}

// 添加聊天
export function addChat(data) {
  return request({
    url: '/chat/add',
    method: 'post',
    data
  })
}

// 更新聊天
export function updateChat(data) {
  return request({
    url: '/chat/update',
    method: 'put',
    data
  })
}

// 删除聊天
export function deleteChat(chatId) {
  return request({
    url: `/chat/delete/${chatId}`,
    method: 'delete'
  })
} 